package org.dcits.controller;

import java.text.SimpleDateFormat;

public class GetTime {
	public static void main(String[] args) {
		//调用生成id方法
		System.out.println(getGuid()); 
	}
	
	/**
	 * 20位末尾的数字id
	 */
	public static int Guid=100;

	public static String getGuid() {
		
		GetTime.Guid+=1;

		long now = System.currentTimeMillis();  
		//获取4位年份数字  
		SimpleDateFormat dateFormat=new SimpleDateFormat("yyyy");  
		//获取时间戳  
		String time=dateFormat.format(now);
		String info=now+"";
				
		return time+info.substring(2, info.length());  
	}
}
